<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta content="telephone=no" name="format-detection" />
    <!-- 留作将来统一添加 -->
    <TEMPLATE>${TEMPLATE}</TEMPLATE>
    <title>激活提示</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css">
    <link rel="stylesheet" type="text/css" href="../../css/index.css">
    <link rel="stylesheet" type="text/css" href="../../css/data-flex.min.css">
    <style type="text/css">
        body,
        html {
            background-color: rgba(0, 0, 0, 0);
        }
        
        .translucent-background {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            margin: auto;
            width: 200px;
            height: 90px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 10px;
            text-align: center;
        }
        
        .fail-text {
            width: 161px;
            font-size: 15px;
            font-weight: 500;
            color: rgba(255, 255, 255, 1);
            line-height: 25px;
        }
        
        .success-text {
            font-size: 15px;
            font-weight: 500;
            color: rgba(255, 255, 255, 1);
        }
        
        img {
            width: 28px;
            height: 28px;
            margin-bottom: 10px;
            margin-left: auto;
            margin-right: auto;
        }
    </style>
</head>

<body>
    <div class="vueApp" v-cloak>
        <div class="translucent-background" v-if="isUnlock" data-flex="main:center cross:center">
            <div>
                <img src="../../image/ui/success.png" alt="">
                <div class="success-text">
                    解锁成功
                </div>
            </div>
        </div>
        <div class="translucent-background" v-else data-flex="main:center cross:center">
            <div class="fail-text">
                当前激活码已被激活,不能重复使用
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/service/service-tool.js"></script>
<script type="text/javascript" src="../../script/service/service-app.js"></script>
<script type="text/javascript" src="../../script/service/service-user.js"></script>
<script type="text/javascript" src="../../script/service/service-logic.js"></script>
<script type="text/javascript" src="../../script/service/service-attr.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript">
    // html 的引号一律为双引号(""),js 为单引号('')
    var USER, $S, vm, param;
    apiready = function() {
        $S = SERVICE();
        USER = USER();
        console.log(JSON.stringify(api.pageParam) + '=====pageParam');
        param = api.pageParam;
        fnInit();
    };
    // 初始化
    function fnInit() {
        vm = new Vue({
            el: '.vueApp',
            data: {
                isUnlock: param.isUnlock
            }
        });
        // 2000毫秒后关闭提示
        setTimeout(function() {
            api.closeFrame();
        }, 2000)
    }
</script>

</html>